package com.tanhua.controller;

import com.tanhua.service.AnalysisByDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dashboard")
public class DashboardController {
    @Autowired
    private AnalysisByDayService analysisByDayService;

    /**
     * 首页，统计的摘要数据
     * get  /summary
     */
    @GetMapping("/summary")
    public ResponseEntity summary() {
        return analysisByDayService.summary();
    }
}
